package com.wngbms.aop._04;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;

public class AspectXmlPointcutConfig {

    public void beforeAnyPublicMethod() {
        System.out.println("before any public method...");
    }

    public Object aroundAnyPublicMethod(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("around any method");
        // 需要显式调用
        return pjp.proceed();
    }

    public void afterAnyPublicMethod(JoinPoint joinPoint) throws Throwable {
        System.out.println("after method");
    }

    public void afterRetAnyPublicMethod(JoinPoint joinPoint) throws Throwable {
        System.out.println("afterret method");
    }

    public void afterExpAnyPublicMethod(JoinPoint joinPoint) throws Throwable {
        System.out.println("afterexp method");
    }
}
